//
//  PhoneBookTool.h
//  ECDH100
//
//  Created by wuping on 16/7/7.
//  Copyright © 2016年 eyescontrol. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef void(^ReceviePhoneBookBlock)(NSArray *AddressBookArr);

@interface PhoneBookTool : NSObject

@property (nonatomic, strong) NSMutableArray *contactArr;          //联系人信息
@property (nonatomic, strong) NSMutableArray *phoneNumberArr;       //联系人电话数组
@property (nonatomic, strong) NSMutableArray *phoneBookArr;         //联系人电话和名称

/**
 *  是否有权限打开通讯录
 *
 *  @return YES Or NO
 */
+ (BOOL)getAuthorizationStatus;

/**
 *  获取通讯录联系人电话
 *
 *  @param block 返回所有联系人电话数组
 */
+ (void)getPhoneNumberList:(ReceviePhoneBookBlock)block;

/**
 *  获取通讯录联系人昵称和电话
 *
 *  @param block 返回数组，数组中元素为字典，字典中两个元素， key="name" and  key="phoneNumber"
 */
+ (void)getPhoneNumberAndName:(ReceviePhoneBookBlock)block;

@end
